package net.csdn.business.common.oauth2.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.csdn.business.common.domain.SuperEntity;

import java.util.Date;


/**
 * accessToken信息对象 oauth_access_token
 * 
 * @author zhangyl
 * @date 2022-11-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("oauth_access_token")
public class OauthAccessToken extends SuperEntity<OauthAccessToken>
{
    private static final long serialVersionUID = 1L;

    /** 配置id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 分布式id */
    private String objectId;

    /** tokenId */
    private String tokenId;

    /** 序列化后的token */
    private byte[] token;

    /** authenticationId */
    private String authenticationId;

    /** 用户名 */
    private String userName;

    /** clientId */
    private String clientId;

    /** 序列化后的authentication */
    private byte[] authentication;

    /** refreshToken */
    private String refreshToken;

    /** token过期时间 */
    private Date expirTime;

    /** token类型：1:oauth2生成的token;2:私人永久token */
    private Integer tokenType;

}
